## ubuntu 平台&mk文件
PLATFORM = ubuntu
MK = x86_64.mk

## android 平台&mk文件
# PLATFORM = android
# MK = armeabi-v7a.mk
# MK = arm64-v8a.mk
# MK = mips64.mk
# MK = x86.mk
# MK = x86_64.mk

include ../$(PLATFORM)/$(MK)

CFLAGS += $(EXT_CFLAGS)
CFLAGS += -Wall -lpthread -lstdc++
CFLAGS += -fsanitize=address

INCS += $(EXT_INCS)
INCS += -I../
INCS += -I../../
INCS += -I../$(PLATFORM)
INCS += -I../$(PLATFORM)/else

LIBS += $(EXT_LIBS)

# 包含文件夹的所有.cpp文件
SRCS += ${wildcard ../$(PLATFORM)/else/*.cpp}

all: display input storage

display:
	@$(GCC) -o out.$@ $@.cpp \
	../$(PLATFORM)/plat_$@.cpp \
	../../common/image.cpp \
	$(SRCS) $(INCS) $(LIBS) $(CFLAGS)

input:
	@$(GCC) -o out.$@ $@.cpp \
	../$(PLATFORM)/plat_$@.cpp \
	$(SRCS) $(INCS) $(LIBS) $(CFLAGS)

storage:
	@$(GCC) -o out.$@ $@.cpp \
	../plat_$@_base.cpp \
	../$(PLATFORM)/plat_$@.cpp \
	$(SRCS) $(INCS) $(LIBS) $(CFLAGS)

clean:
	@rm -rf out*
